﻿using SanlieHash.SecureHash;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace net_path.Tools.Password
{
    public static class PasswordVersion
    {
        public static string ReadVersionTag(string pass)
        {
            return pass.Substring(pass.Length - 2, 2);
        }
        internal static int ReadPasswordLength(string pass)
        {
            var versiontag = ReadVersionTag(pass);

            switch (versiontag)
            {
                case "A1":
                case "B1":
                    //sha3_512 + md5
                    return 160;
            }
            throw new Exception("不支持的密码");
        }
    }
}
